docs: fix README structure of stats/base/dists/chi/cdf#11740
Merged
Conversation
…ions Restructured the README so the C APIs block is a top-level section after the JavaScript Examples, matching the pattern followed by 9/10 native-addon siblings in `stats/base/dists/chi`. Closes the outer `<section class="usage">` after the `cdf.factory` subsection, adds the JavaScript `## Examples` section, then wraps the C APIs in `<section class="c">` with `## C APIs` (previously `### C APIs`, nested inside the JS usage section) and promotes the C `### Usage` heading from `#### Usage` to match the majority conformance (90% of sibling native-addon packages). Docs-only change; no source, tests, examples, or public API affected. https://claude.ai/code/session_01FXfscMHk9EUo3WE1FJswD5
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
stats/base/dists/chi with namespace majority patternsstats/base/dists/chi/cdf
Member
|
/stdlib merge |
…ats-base-dists-chi-2026-04-23
kgryte
approved these changes
Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request:
@stdlib/stats/base/dists/chiwith namespace majority patterns (random namespace pick, seed20260423).Namespace summary
@stdlib/stats/base/dists/chipackage.jsontop-level +scripts+stdlibkeys,manifest.jsonkeys, README section order & heading levels, test/benchmark/examples filenames, public signature, validation prologue, error construction, JSDoc shape,@stdlib/*dependency set.cdf).paramTags/returnsTypeforksplit betweenNonNegativeNumberandPositiveNumber— reflects real implementation boundary behavior atk=0; native-addon file set andgypfilekey missing fromctorandquantile— intentional (class constructor and no closed-form inverse CDF;chisquare/quantileandgamma/quantilesimilarly lack native code).returnKindwas 12/12value(trivially unanimous);errorConstructionmajority was meaningless because 11/12 math functions construct no error strings at all (onlyctorthrows, and it already usesformat).Per-outlier corrections
stats/base/dists/chi/cdfFixes structural drift in the
cdfREADME where### C APIswas nested inside<section class="usage">at the wrong heading level, and the JS## Examplesblock appeared after the C content rather than before it. Closed the JS usage section aftercdf.factory, inserted## Examplesbefore the* * *rule, wrapped the C block in a top-level<section class="c">, and promoted the inner#### Usageto### Usage. 9 of 10 sibling packages in@stdlib/stats/base/dists/chi(entropy, kurtosis, logpdf, mean, mode, pdf, skewness, stdev, variance) already follow this structure, confirming the corrected layout matches the enforced canonical form required byremark-lint-expected-html-sections.Related Issues
No.
Questions
No.
Other
Validation
package.jsonkeys, README headings,manifest.json, test/benchmark/examples filenames).@stdlib/*dependencies).cdfREADME restructure as the single high-signal correction; no intentional deviation, no cascading changes, no test/example/contract impact.Deliberately excluded:
ctorandquantilelacking native-addon files (manifest.json,binding.gyp,src/,lib/native.js,benchmark.native.js,test.native.js,gypfile) — intentional.ctoris a constructor class;quantilehas no closed-form inverse for the chi CDF. Peer distributions (chisquare/quantile,gamma/quantile) match.stdev/test/fixtures/python/vs.*/test/fixtures/julia/elsewhere — diverging test-fixture generator would require regeneratingdata.jsonand is out of scope for mechanical drift correction.ktyped asNonNegativeNumberin 7 packages vs.PositiveNumberin 5 — each typing matches the package's actual domain (explicit handling atk=0vs.NaNreturn atk<=0).returnsTypesplintered acrossProbability/Chi/number/NonNegativeNumber/PositiveNumber— each reflects the true output range of that moment / function.Local report:
~/drift-reports/drift-stats-base-dists-chi-2026-04-23.md.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was produced by Claude Code running the cross-package drift-detection routine: random namespace pick (seed
20260423→stats/base/dists/chi), structural + semantic feature extraction across all 12 members, majority vote at the 75% threshold, and three-agent validation (semantic review, cross-reference, structural review) before any edit. Only corrections that all three agents confirmed as mechanical, non-behavior-changing, and backed by a ≥75% conformance majority were applied. A human will audit and promote from draft.Generated by Claude Code